|
LOAD OBJECT
This command loads a model into the specified 3D object number.
LOAD OBJECT Filename, Object Number
LOAD OBJECT Filename, Object Number, DBPro Mode
LOAD OBJECT Filename, Object Number, DBPro Mode, Divide Texture
Filename
String
The name string of the 3d model in the X, DBO, 3DS, MDL, MD2 or MD3 format
Object Number
Integer
The object number to use
DBPro Mode
Integer
The load mode parameter controls how the data loaded from the model is handled, and which behaviour is required
Divide Texture
Integer
The reduce texture mode also controls a run-time scale down of the loaded texture
This command does not return a value.
You must specify a model in the X, DBO, 3DS, MDL, MD2 or MD3 format. Once you have loaded the 3D object file successfully, you can use the specified 3D object number to position, rotate, scale, animate and manipulate your 3D object. The object number should be specified using an integer value. The optional Load Mode parameter controls how the data loaded from the model is handled, and which behaviour is required. An additional Reduce Texture mode also controls a run-time scale down of the loaded texture plate. Be aware that when you load an object that has associated textures, you are handing over texture management to the engine which will attempt to save texture memory by re-using textures previously loaded from the same filename. To take over texture management, use LOAD IMAGE and TEXTURE OBJECT commands.
Load Mode: 0-DBV1 legacy behaviour 1-DBPro : DBPRO default behaviour 2-Leave states alone to keep material/diffuse effects 3-Leave states alone to keep material/texture effects 4-Ensure object blends texture and diffuse at stage zero 5-Leave states alone to keep multi-material effects
Reduce Texture Mode: 0-No Reduction N-Divide By N
sync on : sync rate 0 : hide mouse:cls 0
ObjectNumber=1
SecondObject=2
load object "model.x",ObjectNumber
load object "model.x",SecondObject
rotate object ObjectNumber, 270, 0, 0
fix object pivot ObjectNumber
point object ObjectNumber,0,0,0
position object ObjectNumber, 0,0,0
while mouseclick()=0
sync
endwhile
delete object ObjectNumber
delete object SecondObject
end
BASIC3D Commands Menu
Index
|